<script setup>
import { onMounted, reactive, ref } from "vue";
import axios from "axios";

const data = reactive({
  userVoteList: [],
});
const getUserVoteList = () => {
  axios.get("/user-vote/getUserVoteList").then((res) => {
    data.userVoteList = res.data.data;
  });
};
getUserVoteList();
</script>
<template>
  <div>
    <div style="margin: 10px">
      <el-breadcrumb :separator-icon="ArrowRight">
        <el-breadcrumb-item>后台管理</el-breadcrumb-item>
        <el-breadcrumb-item>投票记录管理</el-breadcrumb-item>
      </el-breadcrumb>
    </div>
    <el-table :data="data.userVoteList" stripe>
      <el-table-column type="index" label="序号" />
      <el-table-column prop="theme" label="投票主题" />
      <el-table-column prop="username" label="投票用户"> </el-table-column>
      <el-table-column prop="option" label="投票选项"> </el-table-column>
      <el-table-column prop="createTime" label="创建时间" />
      <el-table-column fixed="right" label="操作" width="220">
        <template #default="scope">
          <el-tooltip
            class="box-item"
            content="删除"
            placement="top"
            effect="light"
          >
            <el-button type="danger" @click="">
              <el-icon>
                <Delete />
              </el-icon>
            </el-button>
          </el-tooltip>
        </template>
      </el-table-column>
    </el-table>
    <div class="block"></div>
  </div>
</template>
<style scoped>
.block {
  margin-top: 20px;
}
</style>
